//
//  AMHttpRequest.h
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#import "HOBaseObject.h"
#import <UIKit/UIKit.h>
#import "HODefine.h"
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
#import "HOBaseRequestEntity.h"
#import "HOBaseResponseEntity.h"

@protocol AMHttpRequestDelegate <NSObject>

- (void)didReceiveResponse:(HOBaseResponseEntity *)response;

@end

@interface HOHttpRequest : HOBaseObject<ASIHTTPRequestDelegate, ASIHTTPRequestDelegate, ASIProgressDelegate>
{
	
    BOOL                            isCanceled;
    NSMutableData                   *requestedData;
}
@property(nonatomic, retain)NSObject<AMHttpRequestDelegate>* delegate;
@property(nonatomic, retain)HOBaseRequestEntity             *baseRequest;
@property(nonatomic, retain)ASIFormDataRequest              *asiRequest;
- (void)doRequest:(HOBaseRequestEntity *)request;
- (void)cancelRequest;
@end
